//初始化天地图矢量图层
var layer_vec = new ol.layer.Tile({
  title: "天地图矢量图层",
  source: new ol.source.XYZ({
    url: "http://t{0-7}.tianditu.gov.cn/DataServer?T=vec_c&x={x}&y={y}&l={z}&tk=85d34ed96468ba7ee66806d69f0ac8cd",
    crossOrigin: "anonymous",
    projection: "EPSG:4326",
    maxZoom: 18,
    minZoom: 1,
    wrapX: false,
  }),
})
//初始化天地图矢量注记图层
var layer_cva = new ol.layer.Tile({
  title: "天地图矢量注记图层",
  source: new ol.source.XYZ({
    url: "http://t{0-7}.tianditu.gov.cn/DataServer?T=cva_c&x={x}&y={y}&l={z}&tk=85d34ed96468ba7ee66806d69f0ac8cd",
    crossOrigin: "anonymous",
    projection: "EPSG:4326",
    maxZoom: 18,
    minZoom: 1,
    wrapX: false,
  }),
})
//初始化天地图影像图层
var layer_img = new ol.layer.Tile({
  title: "天地图影像图层",
  source: new ol.source.XYZ({
    url: "http://t{0-7}.tianditu.gov.cn/DataServer?T=img_c&x={x}&y={y}&l={z}&tk=85d34ed96468ba7ee66806d69f0ac8cd",
    crossOrigin: "anonymous",
    projection: "EPSG:4326",
    maxZoom: 18,
    minZoom: 1,
    wrapX: false,
  }),
})
//初始化天地图影像注记图层
var layer_cia = new ol.layer.Tile({
  title: "天地图影像注记图层",
  source: new ol.source.XYZ({
    url: "http://t{0-7}.tianditu.gov.cn/DataServer?T=cia_c&x={x}&y={y}&l={z}&tk=85d34ed96468ba7ee66806d69f0ac8cd",
    crossOrigin: "anonymous",
    projection: "EPSG:4326",
    maxZoom: 18,
    minZoom: 1,
    wrapX: false,
  }),
})
// 影像+注记图层组
var imgLayergroup = new ol.layer.Group({
  layers: [layer_img, layer_cia],
  visible: false,
})
// 矢量+注记图层组
var vecLayergroup = new ol.layer.Group({
  layers: [layer_vec, layer_cva],
})
